package com.googlecode.sparda.commons.swing;

import javax.swing.table.TableModel;

/**
 * Interface representing a {@link ColumnNameToMethod}.
 * A class implementing this interface provide get and set functionalities to a specific
 * column name in a {@link TableModel}, typically a class manage getter and setter method for
 * a property of a class.
 * 
 * @author Fabio Grucci (<i>alias</i> <b>Phoenix</b>)
 * @param <E> the type of the element in list
 */
public interface ColumnNameToMethod<E> {
	/**
	 * Method that return the column name relative to this {@link ColumnNameToMethod}.
	 * Typically the column name is represented by a property of an {@link Object}.
	 * @return The column name represented and managed by this class
	 */
	public String getColumnName();
	/**
	 * Get the value to represent in the column of table.
	 * @param e The element to visualize
	 * @return The value to represent in table
	 */
	public Object getValue(E e);
	/**
	 * Set the value of the element
	 * @param e The element where set the value
	 * @param value The new value of the element in corresponding properties
	 */
	public void setValue(E e, Object value);
	
}